package com.baymax.test.scene

import android.app.Activity
import android.app.Instrumentation
import android.content.Context
import android.os.Bundle

class TestInstrument(val app: App) : Instrumentation() {
    private var delegate: Instrumentation? = null

    override fun onCreate(arguments: Bundle?) {
        super.onCreate(arguments)
        println("TestInstrument onCreate")
    }

    override fun callActivityOnCreate(activity: Activity?, icicle: Bundle?) {
        super.callActivityOnCreate(activity, icicle)
        println("TestInstrument callActivityOnCreate $activity ,$icicle")
    }

    override fun callActivityOnResume(activity: Activity?) {
        super.callActivityOnResume(activity)
        println("TestInstrument callActivityOnResume $activity")
    }

    override fun onDestroy() {
        super.onDestroy()
    }

    override fun getContext(): Context {
        return app
    }




    fun setDelegate(get: Instrumentation?) {
        println("TestInstrument setDelegate $get")
        this.delegate = get
    }
}